Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): add attributes argument to recordException API #4071

Merged

Conversation

dvoytenko
Copy link
Contributor

@dvoytenko dvoytenko commented Aug 16, 2023

Which problem is this PR solving?

Adds the optional attributes argument to the recordException API.

Fixes #4070

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • packages/opentelemetry-sdk-trace-base/test/common/Span.test.ts

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@dvoytenko dvoytenko requested a review from a team August 16, 2023 18:27
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 16, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Merging #4071 (d0c01a8) into main (c84637f) will decrease coverage by 0.78%.
The diff coverage is 0.00%.

❗ Current head d0c01a8 differs from pull request most recent head 96df3fa. Consider uploading reports for the commit 96df3fa to get more accurate results

@@            Coverage Diff             @@
##             main    #4071      +/-   ##
==========================================
- Coverage   90.52%   89.74%   -0.78%     
==========================================
  Files         159      140      -19     
  Lines        3757     3014     -743     
  Branches      835      653     -182     
==========================================
- Hits         3401     2705     -696     
+ Misses        356      309      -47     
Files Changed Coverage
api/src/trace/NonRecordingSpan.ts 0.00%

@dvoytenko dvoytenko requested a review from hectorhdzg August 20, 2023 21:16
@legendecas
Copy link
Member

For reference, open-telemetry/opentelemetry-js-api#97 is the last attempt to implement the feature. @dyladan would you mind confirming if the condition is changed since then (about the comment open-telemetry/opentelemetry-js-api#97 (comment))?

@dvoytenko
Copy link
Contributor Author

For reference, open-telemetry/opentelemetry-js-api#97 is the last attempt to implement the feature. @dyladan would you mind confirming if the condition is changed since then (about the comment open-telemetry/opentelemetry-js-api#97 (comment))?

That change indeed looks very similar. Not sure why it didn't fully go in. It looks like the addEvent API has been appropriately modified, but not recordException.

@dvoytenko dvoytenko changed the title Add attributes argument to recordException API feat(api): add attributes argument to recordException API Aug 21, 2023
@dyladan
Copy link
Member

dyladan commented Aug 21, 2023

@dyladan would you mind confirming if the condition is changed since then (about the comment open-telemetry/opentelemetry-js-api#97 (comment))?

We've had several feature releases of the API since then. There is no need to backport fixes to previous minor versions. The backport requirement is only for major versions according to https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md#api-support

@dvoytenko dvoytenko force-pushed the dvoytenko/attrs-in-record-exception branch from cb79dc3 to 55e1b86 Compare August 21, 2023 18:43
@dvoytenko
Copy link
Contributor Author

I updated the changelog to unblock the changelog workflow.

@dvoytenko dvoytenko force-pushed the dvoytenko/attrs-in-record-exception branch from 55e1b86 to ec0e1e1 Compare August 21, 2023 18:45
Copy link
Member

@hectorhdzg hectorhdzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dvoytenko
Copy link
Contributor Author

@legendecas @dyladan thank you for your reviews! How do I merge this PR now?

api/src/trace/span.ts Outdated Show resolved Hide resolved
@dvoytenko dvoytenko force-pushed the dvoytenko/attrs-in-record-exception branch from ec0e1e1 to 8f71f2c Compare August 28, 2023 17:39
@dvoytenko dvoytenko requested a review from MSNev August 28, 2023 17:41
@dvoytenko
Copy link
Contributor Author

@MSNev I update the APIs as requested. RE:

Also need to add the param to the documentation

Could you point me to where I need to make this change?

@legendecas
Copy link
Member

Also need to add the param to the documentation

Could you point me to where I need to make this change?

I believe you have done this well in the latest commit.

Copy link
Member

@legendecas legendecas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM.

@pichlermarc pichlermarc merged commit cd4998a into open-telemetry:main Aug 30, 2023
14 checks passed
@dvoytenko dvoytenko deleted the dvoytenko/attrs-in-record-exception branch August 30, 2023 15:47
pichlermarc added a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this pull request Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

recordException should allow additional attributes
7 participants